package com.poorstu.dao.impl;

import java.util.List;

import com.common.base.dao.impl.BaseDaoImpl;
import com.poorstu.dao.PoorStudentDao;
import com.poorstu.model.AuditsMod;
import com.poorstu.model.StuPoorMod;

public class PoorStudentDaoImpl extends BaseDaoImpl  implements PoorStudentDao{

	public List<AuditsMod> selectStuPoor(int allUserId) {
		return super.findByHql("from AuditsMod where allUserId="+allUserId+" and flowId="+2);
	}

	public StuPoorMod selectPoor(int auditId) {
		
		return (StuPoorMod)super.findByHql("from StuPoorMod where auditId="+auditId).get(0);
	}

	public void poorStuAdd(StuPoorMod stuPoor) {
		super.save(stuPoor);
	}

	public StuPoorMod selectStuPoorById(int stuPoorId) {
		
		return (StuPoorMod)super.findByHql("from StuPoorMod where stupoorId="+stuPoorId).get(0);
	}

	public void updatePoorStu(StuPoorMod stuPoor) {
		super.merge(stuPoor);
	}

	public void DeletePoorStu(StuPoorMod stuPoor) {
		super.delete(stuPoor);
		
	}

	public List<StuPoorMod> selectStuPoorAll() {
		return super.findAll("StuPoorMod");
	}
	
	
	
	
	

	

	
}
